package cn.ddiancan.xddcloud.common.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StreamUtils;

import java.io.Closeable;

@Slf4j
public class XddcloudSreamUtils extends StreamUtils {

    public static void close(Closeable... closeables) {
        if (closeables != null) {
            try {
                for (Closeable closeable : closeables) {
                    if (closeable != null) {
                        closeable.close();
                    }
                }
            } catch (Exception e) {
                log.error(e.getMessage(), e);
            }
        }
    }
}
